﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
namespace SMBCFamilyAssessment.Models
{
  public class AssessmentContext : DbContext
  {
    public AssessmentContext()
      : base("SMBCFamilyAssessment")
    {


    }


    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {


        modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
     




    }

    public DbSet<Family> Families { get; set; }
    public DbSet<Person> Persons { get; set; }
    public DbSet<QuestionSet> QuestionSets { get; set; }
    public DbSet<Question> Questions { get; set; }
    public DbSet<AssessmentType> AssessmentTypes { get; set; }
    public DbSet<Assessment> Assessments { get; set; }

    public DbSet<AssessmentSpecification> AssessmentSpecifications { get; set; }

    public DbSet<AssessmentSession> AssessmentSessions { get; set; }

  }
}